package com.ecloud.openapi.security.convert;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import com.ecloud.openapi.security.dto.BasePermissionDto;
import com.ecloud.openapi.security.po.BasePermissionPo;
import com.ecloud.openapi.security.vo.BasePermissionVo;

/**
 * BasePermissionConvert 模型转换
 *
 * @author LiuGangQiang Create in 2021/07/04
 */
@Mapper
public interface BasePermissionConvert {
    BasePermissionConvert INSTANCE = Mappers.getMapper(BasePermissionConvert.class);

    /**
     * {@link BasePermissionDto}对象 >> {@link BasePermissionPo}对象
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dto 入参
     * @return {@link BasePermissionPo} 对象
     */
    BasePermissionPo dtoToPo(BasePermissionDto dto);

    /**
     * {@link BasePermissionDto}集合 >> {@link BasePermissionPo}集合
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dtos 入参
     * @return {@link BasePermissionPo} 集合
     */
    List<BasePermissionPo> dtoToPo(List<BasePermissionDto> dtos);

    /**
     * {@link BasePermissionPo}对象 >> {@link BasePermissionVo}对象
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dto 入参
     * @return {@link BasePermissionVo} 对象
     */
    BasePermissionVo poToVo(BasePermissionPo po);

    /**
     * {@link BasePermissionPo}集合 >> {@link BasePermissionVo}集合
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dtos 入参
     * @return {@link BasePermissionVo} 集合
     */
    List<BasePermissionVo> poToVo(List<BasePermissionPo> pos);
}
